<template>
  <div class="myMore">
    <!--  导航开始 -->
    <commonHeader :title="title" @goBack="goBack"></commonHeader>
    <div class="content">
      <div class="contentList">
        <!--      其余我的-->
        <div class="commonBg commonOneContainer">
          <!--        我的店铺-->
          <router-link to="myStore" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon1.png" alt="">
              <h4>我的店铺</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </router-link>
          <!--        商城订单-->
          <div @click="myStoreOrder" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon2.png" alt="">
              <h4>商城订单</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
          <!--        银发订单-->
          <router-link to="grayHairOrder" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon3.png" alt="">
              <h4>银发订单</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </router-link>
          <!--        我的认证-->
          <router-link to="myCertification" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon4.png" alt="">
              <h4>我的认证</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </router-link>
          <!--        我的推广-->
          <div @click="myExtension()" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon5.png" alt="">
              <h4>我的推广</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
          <!--        我是专家-->
          <div @click="myExpert()" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon6.png" alt="">
              <h4>我是专家</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
          <!--        热榜-->
<!--          <div class="commonOneContent borderBottom flex-space-between">-->
<!--            <div class="flex-start">-->
<!--              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon8.png" alt="">-->
<!--              <h4>热榜</h4>-->
<!--            </div>-->
<!--            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">-->
<!--          </div>-->
          <!--        实名认证-->
          <div @click="realName()" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon12.png" alt="">
              <h4>实名认证</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
          <!--        扫一扫-->
          <div @click="myScan()" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon10.png" alt="">
              <h4>扫一扫</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
          <!--        少年模式-->
<!--          <div class="commonOneContent borderBottom flex-space-between">-->
<!--            <div class="flex-start">-->
<!--              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon7.png" alt="">-->
<!--              <h4>少年模式</h4>-->
<!--            </div>-->
<!--            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">-->
<!--          </div>-->

          <!--        专家发布-->
          <div @click="createVideo" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon11.png" alt="">
              <h4>专家发布</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
           <!--        今日推荐-->
          <div @click="goad" class="commonOneContent borderBottom flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon5.png" alt="">
              <h4>今日推荐</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>

          <!--        更多-->
          <div @click="setSystem" class="commonOneContent flex-space-between">
            <div class="flex-start">
              <img class="mineIcon" src="http://job.dayinyun.com/mineIcon9.png" alt="">
              <h4>更多</h4>
            </div>
            <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
          </div>
         <!-- 直播
         <div @click="liveBroadcast" class="commonOneContent flex-space-between">
           <div class="flex-start">
             <img class="mineIcon" src="http://job.dayinyun.com/mineIcon9.png" alt="">
             <h4>直播</h4>
           </div>
           <img class="rightIcon" src="http://job.dayinyun.com/rightIcon.png" alt="">
         </div> -->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import commonHeader from "../../components/common/commonHeader.vue"
  export default {
    name:"myMore",
    components:{
      commonHeader,
    },
    data() {
      return {
        title:"我的更多",
      }
    },
    mounted() {
    },
    methods:{
      // 返回
      goBack(){
        if (window.history.length>1){
          window.history.go(-1)
        }else {
          if (this.$systemInfo() === "android") {
            window.android.closeCurrentPage();
          } else if (this.$systemInfo() === "ios") {
            window.webkit.messageHandlers.closeCurrentPage.postMessage(null);
          }
        }
      },
      // 商场订单
      myStoreOrder(){
        window.location.href = 'https://shop.hongjitimes.com/#/my/order?urltype=' + 'me'
      },
      // 我的推广
      myExtension(){
        window.location.href = 'https://whcpc.hongjitimes.com/#/?urltype=' + 'me'
      },
      // 我是专家
      myExpert(){
        window.location.href = 'https://fexpert.hongjitimes.com/?urltype=' + 'me'
      },
      // 实名认证
      realName(){
        this.removesesStore("fullPath");
        this.setsesStore("fullPath", this.$route.fullPath);
        this.$router.push("realName");
      },
      //今日推荐
      goad(){
         this.$router.push({name:"advertisement"})
      },
      // 扫一扫
      myScan(){
        let type = 2;
        if (this.$systemInfo() === "android") {
          window.android.toQrScanning(type);
        } else if (this.$systemInfo() === "ios") {
          window.webkit.messageHandlers.toQrScanning.postMessage(type);
        }
      },
      // 直播
      liveBroadcast(){
        // let title = "测试直播"
        // let coverUrl = "http://job.dayinyun.com/123.jpeg"
        // if (this.$systemInfo() === "android") {
        //   window.android.initiateLive(title,coverUrl);
        // } else if (this.$systemInfo() === "ios") {
        //   window.webkit.messageHandlers.initiateLive.postMessage(title,coverUrl);
        // }
        this.$router.push({name:"advertisement"})
      },
      // 发起短视频
      createVideo(){
        let that = this;
        let channel = "h5";//频道
        let activity_id = 0;//id
        let source = "zhuanjiake";//来源
        let promotion_link_url = "";//推广链接
        that.$toast("发起视频")
        if (that.$systemInfo() === "android") {
          that.$toast("app - android")
          window.android.releasedVideo(channel,activity_id,source,promotion_link_url);
        } else if (that.$systemInfo() === "ios") {
          let data={
            channel:'h5',//频道
            activity_id:0,//id
            source:"zhuanjiake",//来源
            promotion_link_url:"",//推广链接
          }
          window.webkit.messageHandlers.releasedVideo.postMessage(JSON.stringify(data));
        }
      },
      setSystem(){
        this.$router.push({name:"myMorelist"});
      }
    }
  }
</script>

<style lang="less" scoped>
  @import (reference) url(../../assets/less/common);
  .myMore{
    width:100%;
    position: relative;
    .content{
      width:100%;
      position: absolute;
      top:1.64rem;
      z-index:10;
      margin-bottom:0.5rem;
      .contentList{
        width:100%;
        padding:0 0.3rem;
        box-sizing: border-box;
        .commonOneContainer{
          width:100%;
          padding:0 0.3rem;
          box-sizing: border-box;
          .commonOneContent{
            width:100%;
            height:1.17rem;
            .mineIcon{
              width:0.5rem;
              height:auto;
              margin-right:0.16rem
            }
            h4{
              font-size:@fontSize34;
              font-family:@fontFamily400;
              font-weight:@fontWeight500;
              color:#ffffff;
            }
            .rightIcon{
              width:0.28rem;
              height:auto;
            }
          }

        }
      }
    }
    .commonBg{
      width:100%;
      background: #232323;
      border-radius: 0.1rem;
      margin-bottom:0.2rem;
    }
    .borderBottom{
      border-bottom: 0.02rem solid #444444;
    }
    .borderRight{
      border-right: 0.02rem solid #444444;
    }
  }
</style>
